package com.emotionalEnvelope.edu.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@TableName("emails")
public class Email extends Model<Email> {
    @TableId(type = IdType.AUTO)
    private Long id;
    @NotNull(message = "书写人不能为空")
    private Long writerId;
    //接收人
    private Long acceptId;
    @NotBlank(message = "消息不能为空")
    private String notice;
    //状态 已读1未读0
    private Integer status;
    //标签    interface EmailTag
    private String tag;
    //类型   0消息  1邮件
    @NotNull(message = "类型不能为空")
    private Integer type;
    //范围 0对话,公共1,秘密2
    private String ranges;
    //邮箱
    private String email;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;
}
